gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 5 Oct 2017 23:06:03 +0000 (01:06 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 16 Oct 2017 09:31:00 +0000 (11:31 +0200)
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.

https://bugzilla.gnome.org/show_bug.cgi?id=784314

gdk/wayland/gdkwindow-wayland.c

index 1697dcda520841972c3192508d53cc2a98f7f021..cbc7bfb65450a8df3722ba3beb8cf9756e45ea99 100644 (file)
@@ -2637,7 +2637,8 @@ gdk_window_wayland_move_resize (GdkWindow *window,
   if (with_move)
     {
       /* Each toplevel has in its own "root" coordinate system */
-      if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TOPLEVEL)
+      if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TOPLEVEL &&
+          (window->x != x || window->y != y))
         {
           window->x = x;
           window->y = y;